# 方法一
def f1():
    lst = [1,3,5,6,2,2,2,2,2,2]
    for i in lst:
        if lst.count(i)>len(lst)/2:
            print(i)
            break
f1()
# 方法二
def f2():
    lst = [1,3,5,6,2,2,2,2,2,2]
    tmp = lst
    count=0
    n=len(lst)
    for i in range(n):
        for j in tmp:
            tmp.pop(i)
            # print(tmp)
            if j == lst[i]:
                count+=1
        if count>n/2:
            print(f"{lst[i]}出现了{count}次")
            break
f2()

